package cn.sumpu.app.wlcity.domain;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import cn.sumpu.app.wlcity.util.Common;


public class Vote implements Serializable{

	private static final long serialVersionUID = -8696144238939899565L;
	private String identifier;
	private String title;
	private String body;
	private String picUrl;
	private Integer sort;
	private Boolean enabled;
	private String app;
	private String voteType;
	private Date gmtCreated;
	private Date gmtModified;
	private List<VoteItem> voitemList;
	private Integer voteCount;//投票数
	
	public String getIdentifier() {
		return identifier;
	}
	public void setIdentifier(String identifier) {
		this.identifier = identifier;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getBody() {
		return body;
	}
	public void setBody(String body) {
		this.body = body;
	}
	public String getPicUrl() {
		return picUrl;
	}
	public void setPicUrl(String picUrl) {
		this.picUrl = picUrl;
	}
	
	public Integer getSort() {
		return sort;
	}
	public void setSort(Integer sort) {
		this.sort = sort;
	}
	public Boolean getEnabled() {
		return enabled;
	}
	public void setEnabled(Boolean enabled) {
		this.enabled = enabled;
	}
	public Date getGmtCreated() {
		return gmtCreated;
	}
	public void setGmtCreated(Date gmtCreated) {
		this.gmtCreated = gmtCreated;
	}
	public Date getGmtModified() {
		return gmtModified;
	}
	public void setGmtModified(Date gmtModified) {
		this.gmtModified = gmtModified;
	}
	public List<VoteItem> getVoitemList() {
		return voitemList;
	}
	public void setVoitemList(List<VoteItem> voitemList) {
		this.voitemList = voitemList;
	}
	public String getApp() {
		return app;
	}
	public void setApp(String app) {
		this.app = app;
	}
	public String getVoteType() {
		return voteType;
	}
	public void setVoteType(String voteType) {
		this.voteType = voteType;
	}
	public Integer getVoteCount() {
		return voteCount;
	}
	public void setVoteCount(Integer voteCount) {
		this.voteCount = voteCount;
	}
	public String getBodyText(){
		String text="";
		if(!Common.empty(body)){
			text=Common.filterHtml(body);
			text=text.replaceAll(" ","");
			if(text.length()>100){
				text=text.substring(0, 100)+"...";
			}
		}
		return text;
	}
}
